Skip to content

Remove empty result_set_to_ruby_data_type method#297

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:drop-empty-result-set-to-ruby-data-type
May 13, 2026
Merged

Remove empty result_set_to_ruby_data_type method#297
yahonda merged 1 commit into
rsim:masterfrom
yahonda:drop-empty-result-set-to-ruby-data-type

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented May 13, 2026

Summary

JDBCConnection defined an empty stub:

def result_set_to_ruby_data_type(column_type, column_type_name)
end

It returned nil, had zero call sites anywhere in lib/ or spec/, and no dynamic dispatch construction targets the name. The enclosing class is tagged # :nodoc:, so removing the stub does not affect a documented public API surface.

Verification before deletion

  • grep -rn "result_set_to_ruby_data_type" lib/ spec/ → 1 match (the definition itself)
  • grep -rn "send.*result_set|to_ruby_data_type|public_send.*result|respond_to?.*result_set" lib/ spec/ → no dynamic-dispatch construction would resolve to this name
  • README / Usage docs reference plsql.<procedure> style APIs, not this internal method
  • class JDBCConnection < Connection # :nodoc: — opted out of public documentation

Origin

git log --all -S "def result_set_to_ruby_data_type" -- lib/plsql/jdbc_connection.rb shows the method was introduced empty from day one in commit ca4bebf (2009-11-17), part of the larger "support for cursor return values and output parameters in JRuby / JDBC" change that overhauled jdbc_connection.rb (+154 / -113 across 4 files).

The signature (column_type, column_type_name) mirrors JDBC's ResultSetMetaData#getColumnType(i) / #getColumnTypeName(i), suggesting it was planned as a JDBC-ResultSet counterpart to plsql_to_ruby_data_type(metadata) — but the implementation that actually landed took a different route (the SQL_TYPE_TO_RUBY_CLASS lookup used by get_ruby_value_from_result_set). The stub was orphaned and never called. Across ~16 years and 5 subsequent edits to the method's textual surface, every change has been whitespace-only.

Diff stat: lib/plsql/jdbc_connection.rb | 3 --- (-3 lines).

Test plan

  • bundle exec rspec — 468 examples, 0 failures, 1 pre-existing pending
  • ruby -c lib/plsql/jdbc_connection.rb passes
  • Grep confirms zero remaining references to the method name
  • CI matrix exercises the JDBC (JRuby) path

🤖 Generated with Claude Code

The method was defined as an empty stub in JDBCConnection (`def ... end`
with no body, returning nil). It had zero call sites anywhere in lib/ or
spec/, no dynamic dispatch construction targets the name, and the
enclosing class is tagged `# :nodoc:` so it is not part of a documented
public API. Drop the dead code.

Net change: -3 LOC. No behavior change. Full suite is green
(468 examples, 0 failures, 1 pre-existing pending).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yahonda yahonda merged commit 13b19ed into rsim:master May 13, 2026
20 checks passed
@yahonda yahonda deleted the drop-empty-result-set-to-ruby-data-type branch May 13, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant